Skip to content

chore(eslint): update Unicorn and enable iteration fallback style - #9673

Merged
BridgeAR merged 1 commit into
masterfrom
BridgeAR/2026-08-04-unicorn-73-iteration-rule
Aug 4, 2026
Merged

chore(eslint): update Unicorn and enable iteration fallback style#9673
BridgeAR merged 1 commit into
masterfrom
BridgeAR/2026-08-04-unicorn-73-iteration-rule

Conversation

@BridgeAR

@BridgeAR BridgeAR commented Aug 4, 2026

Copy link
Copy Markdown
Member

Summary

Update eslint-plugin-unicorn to 73.0.0 and enable unicorn/iteration-fallback-style. Replace implicit iterable fallbacks with guards where values can be absent and direct iteration where collections are required.

Why

The rule makes iterable fallback contracts visible. Required repository-owned collections now fail on broken invariants, while genuinely nullable and third-party values keep guards.

unicorn/single-line-block-comment-style stays disabled because Unicorn 73 recommends it and enabling it here would add an unrelated JSDoc formatting migration.

## Summary

Update `eslint-plugin-unicorn` to 73.0.0 and enable `unicorn/iteration-fallback-style` across the repository.

## Why

The rule makes iterable fallback contracts explicit. Repository-owned collections are iterated directly, while nullable and third-party values keep guarded iteration.

## Test plan

`npm run lint` and focused Bedrock, remote-config, Jest, WebdriverIO, Vitest, and telemetry tests.
@dd-octo-sts

dd-octo-sts Bot commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

Overall package size

Self size: 7.81 MB
Deduped: 8.47 MB
No deduping: 8.47 MB

Dependency sizes | name | version | self size | total size | |------|---------|-----------|------------| | import-in-the-middle | 3.3.3 | 125.43 kB | 441.68 kB | | opentracing | 0.14.7 | 194.81 kB | 194.81 kB | | dc-polyfill | 0.1.11 | 25.74 kB | 25.74 kB |

🤖 This report was automatically generated by heaviest-objects-in-the-universe

@datadog-official

datadog-official Bot commented Aug 4, 2026

Copy link
Copy Markdown

Tests

🎉 All green!

🧪 All tests passed
❄️ No new flaky tests detected

🎯 Code Coverage (details)
Patch Coverage: 99.38%
Overall Coverage: 98.51% (+0.00%)

This comment will be updated automatically if new data arrives.
🔗 Commit SHA: 39fce0f | Docs | Datadog PR Page | Give us feedback!

@codecov

codecov Bot commented Aug 4, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 99.37888% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 98.51%. Comparing base (69c5166) to head (39fce0f).
⚠️ Report is 3 commits behind head on master.

Files with missing lines Patch % Lines
packages/dd-trace/src/config/remote_config.js 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff            @@
##           master    #9673    +/-   ##
========================================
  Coverage   98.51%   98.51%            
========================================
  Files         957      957            
  Lines      134553   134614    +61     
  Branches    11689    12064   +375     
========================================
+ Hits       132551   132612    +61     
  Misses       2002     2002            
Flag Coverage Δ
aiguard 56.94% <20.83%> (-0.04%) ⬇️
aiguard-integration 55.74% <4.34%> (-0.03%) ⬇️
apm-bucket-0 57.19% <12.50%> (-0.04%) ⬇️
apm-bucket-1 63.30% <36.36%> (-0.03%) ⬇️
apm-bucket-2 62.10% <12.50%> (-0.04%) ⬇️
apm-bucket-3 59.61% <12.50%> (-0.04%) ⬇️
apm-capabilities-tracing 62.58% <12.03%> (+0.01%) ⬆️
apm-integrations-aerospike 56.23% <12.50%> (-0.04%) ⬇️
apm-integrations-confluentinc-kafka-javascript 60.97% <12.50%> (-0.04%) ⬇️
apm-integrations-couchbase 56.65% <12.50%> (-0.04%) ⬇️
apm-integrations-http 61.96% <10.71%> (-0.04%) ⬇️
apm-integrations-kafkajs 61.56% <12.50%> (-0.04%) ⬇️
apm-integrations-next 58.68% <12.50%> (-0.04%) ⬇️
apm-integrations-prisma 58.25% <12.50%> (-0.04%) ⬇️
appsec 72.06% <12.50%> (-0.04%) ⬇️
appsec-express_fastify_graphql 69.45% <25.00%> (-0.04%) ⬇️
appsec-integration 50.14% <16.66%> (-0.01%) ⬇️
appsec-kafka_ldapjs_lodash 63.33% <12.50%> (-0.04%) ⬇️
appsec-mongodb-core_mongoose_mysql 66.94% <25.00%> (-0.04%) ⬇️
appsec-next 56.53% <10.90%> (-0.03%) ⬇️
appsec-node-serialize_passport_postgres 66.58% <25.00%> (-0.04%) ⬇️
appsec-sourcing_stripe_template 64.93% <25.00%> (-0.04%) ⬇️
debugger 64.20% <12.50%> (-0.04%) ⬇️
instrumentations-bucket-0 51.48% <12.50%> (-0.04%) ⬇️
instrumentations-bucket-1 59.55% <25.00%> (-0.04%) ⬇️
instrumentations-bucket-10 61.36% <25.00%> (-0.04%) ⬇️
instrumentations-bucket-11 51.39% <12.50%> (-0.04%) ⬇️
instrumentations-bucket-12 52.18% <10.71%> (-0.04%) ⬇️
instrumentations-bucket-13 51.50% <12.50%> (-0.04%) ⬇️
instrumentations-bucket-2 53.30% <25.00%> (-0.04%) ⬇️
instrumentations-bucket-3 58.60% <25.00%> (-0.04%) ⬇️
instrumentations-bucket-4 52.02% <12.50%> (-0.04%) ⬇️
instrumentations-bucket-5 57.15% <10.71%> (-0.04%) ⬇️
instrumentations-bucket-6 60.20% <12.50%> (-0.04%) ⬇️
instrumentations-bucket-7 57.97% <12.50%> (-0.03%) ⬇️
instrumentations-bucket-8 58.94% <10.71%> (-0.04%) ⬇️
instrumentations-bucket-9 60.89% <25.00%> (-0.04%) ⬇️
instrumentations-instrumentation-couchbase 50.73% <12.50%> (-0.04%) ⬇️
instrumentations-integration-esbuild 33.79% <0.00%> (-0.01%) ⬇️
llmobs-ai_anthropic_bedrock 62.43% <60.74%> (-0.03%) ⬇️
llmobs-bucket-1 61.22% <6.54%> (-0.05%) ⬇️
llmobs-openai 61.77% <12.50%> (-0.04%) ⬇️
llmobs-openai-agents_vertex-ai 59.72% <12.50%> (-0.04%) ⬇️
llmobs-sdk 66.14% <89.58%> (-0.02%) ⬇️
master-coverage 98.51% <99.37%> (?)
openfeature 55.53% <7.14%> (-0.01%) ⬇️
openfeature-unit 53.06% <12.50%> (-0.04%) ⬇️
platform-core_esbuild_instrumentations-misc 40.40% <19.44%> (-0.02%) ⬇️
platform-integration 60.45% <8.92%> (-0.02%) ⬇️
platform-shimmer_unit-guardrails_webpack 38.63% <8.33%> (-0.02%) ⬇️
plugins-bucket-0 56.75% <6.54%> (-0.05%) ⬇️
plugins-bucket-1 53.83% <5.45%> (-0.03%) ⬇️
plugins-bucket-11 61.79% <12.50%> (-0.04%) ⬇️
plugins-bucket-18 61.35% <25.00%> (-0.04%) ⬇️
plugins-bucket-19 59.52% <12.50%> (-0.04%) ⬇️
plugins-bucket-20 61.54% <12.50%> (-0.04%) ⬇️
plugins-bucket-4 58.11% <12.50%> (-0.04%) ⬇️
plugins-bullmq_cassandra_cookie 61.23% <12.50%> (-0.04%) ⬇️
plugins-cookie-parser_crypto_dd-trace-api 56.29% <12.50%> (-0.04%) ⬇️
plugins-fetch_fs_generic-pool 58.19% <10.71%> (+<0.01%) ⬆️
plugins-google-cloud-pubsub_grpc_handlebars 64.06% <12.50%> (-0.04%) ⬇️
plugins-hapi_hono_ioredis 59.71% <12.50%> (-0.04%) ⬇️
plugins-jest_knex_langgraph 55.27% <12.50%> (-0.04%) ⬇️
plugins-ldapjs_light-my-request_limitd-client 58.03% <12.50%> (-0.04%) ⬇️
plugins-lodash_mariadb_memcached 57.62% <12.50%> (-0.04%) ⬇️
plugins-moleculer_mongodb_mongodb-core 61.35% <20.83%> (-0.04%) ⬇️
plugins-mongoose_multer_mysql 58.62% <20.83%> (-0.04%) ⬇️
plugins-mysql2_nats_node-serialize 60.17% <20.83%> (-0.04%) ⬇️
plugins-opensearch_passport-http_pino 59.06% <12.50%> (-0.04%) ⬇️
plugins-postgres_process_pug 58.21% <20.83%> (-0.04%) ⬇️
plugins-redis_router_sequelize 61.39% <10.71%> (-0.05%) ⬇️
plugins-test-and-upstream-rhea_undici_url 60.95% <10.71%> (-0.04%) ⬇️
plugins-valkey_vm_winston 57.56% <12.50%> (-0.04%) ⬇️
plugins-ws 59.08% <12.50%> (-0.04%) ⬇️
profiling 61.42% <10.71%> (-0.04%) ⬇️
serverless-aws-sdk-aws-sdk 54.86% <6.54%> (-0.05%) ⬇️
serverless-aws-sdk-base-inject-field 50.68% <12.50%> (-0.04%) ⬇️
serverless-aws-sdk-bedrockruntime 54.45% <41.12%> (-0.04%) ⬇️
serverless-aws-sdk-client 56.06% <6.54%> (-0.05%) ⬇️
serverless-aws-sdk-dynamodb 55.31% <6.54%> (-0.06%) ⬇️
serverless-aws-sdk-eventbridge 49.29% <10.71%> (-0.04%) ⬇️
serverless-aws-sdk-kinesis 58.87% <6.54%> (-0.05%) ⬇️
serverless-aws-sdk-lambda 57.00% <6.54%> (-0.05%) ⬇️
serverless-aws-sdk-s3 55.41% <6.54%> (-0.05%) ⬇️
serverless-aws-sdk-serverless-peer-service 59.27% <6.54%> (-0.05%) ⬇️
serverless-aws-sdk-sns 59.70% <6.54%> (-0.05%) ⬇️
serverless-aws-sdk-sqs 60.13% <6.54%> (-0.05%) ⬇️
serverless-aws-sdk-stepfunctions 55.24% <6.54%> (-0.05%) ⬇️
serverless-aws-sdk-util 51.23% <12.50%> (-0.04%) ⬇️
serverless-bucket-0 53.91% <8.33%> (-0.02%) ⬇️
serverless-bucket-1 58.79% <12.50%> (-0.04%) ⬇️
test-optimization-cucumber 71.44% <14.51%> (-0.01%) ⬇️
test-optimization-cypress 65.30% <16.12%> (+0.07%) ⬆️
test-optimization-jest 73.03% <25.71%> (+<0.01%) ⬆️
test-optimization-mocha 72.60% <16.92%> (+0.03%) ⬆️
test-optimization-playwright-playwright-atr 60.05% <6.45%> (-0.06%) ⬇️
test-optimization-playwright-playwright-efd 60.20% <6.45%> (-0.05%) ⬇️
test-optimization-playwright-playwright-final-status 60.36% <6.45%> (-0.06%) ⬇️
test-optimization-playwright-playwright-impacted-tests 59.89% <6.45%> (+0.10%) ⬆️
test-optimization-playwright-playwright-reporting 61.08% <6.45%> (-0.16%) ⬇️
test-optimization-playwright-playwright-test-management 60.90% <6.45%> (-0.15%) ⬇️
test-optimization-playwright-playwright-test-span 60.10% <6.45%> (-0.27%) ⬇️
test-optimization-selenium 59.40% <11.59%> (-0.17%) ⬇️
test-optimization-testopt 57.78% <13.51%> (+0.08%) ⬆️
test-optimization-vitest 73.70% <29.33%> (+<0.01%) ⬆️
test-optimization-vitest-browser 58.95% <6.66%> (-0.05%) ⬇️
test-optimization-webdriverio 64.84% <26.56%> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pr-commenter

pr-commenter Bot commented Aug 4, 2026

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2026-08-04 13:56:21

Comparing candidate commit 39fce0f in PR branch BridgeAR/2026-08-04-unicorn-73-iteration-rule with baseline commit 69c5166 in branch master.

📊 Benchmarking dashboard

Found 0 performance improvements and 0 performance regressions! Performance is the same for 2317 metrics, 41 unstable metrics.

Explanation

This is an A/B test comparing a candidate commit's performance against that of a baseline commit. Performance changes are noted in the tables below as:

  • 🟩 = significantly better candidate vs. baseline
  • 🟥 = significantly worse candidate vs. baseline

We compute a confidence interval (CI) over the relative difference of means between metrics from the candidate and baseline commits, considering the baseline as the reference.

If the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD), the change is considered significant.

Feel free to reach out to #apm-benchmarking-platform on Slack if you have any questions.

More details about the CI and significant changes

You can imagine this CI as a range of values that is likely to contain the true difference of means between the candidate and baseline commits.

CIs of the difference of means are often centered around 0%, because often changes are not that big:

---------------------------------(------|---^--------)-------------------------------->
                              -0.6%    0%  0.3%     +1.2%
                                 |          |        |
         lower bound of the CI --'          |        |
sample mean (center of the CI) -------------'        |
         upper bound of the CI ----------------------'

As described above, a change is considered significant if the CI is entirely outside the configured SIGNIFICANT_IMPACT_THRESHOLD (or the deprecated UNCONFIDENCE_THRESHOLD).

For instance, for an execution time metric, this confidence interval indicates a significantly worse performance:

----------------------------------------|---------|---(---------^---------)---------->
                                       0%        1%  1.3%      2.2%      3.1%
                                                  |   |         |         |
       significant impact threshold --------------'   |         |         |
                      lower bound of CI --------------'         |         |
       sample mean (center of the CI) --------------------------'         |
                      upper bound of CI ----------------------------------'

Unstable benchmarks

These benchmarks have a confidence interval too wide to call a change; treat them as noise rather than signal.

scenario:appsec-appsec-enabled-24

  • unstable execution_time [-214.493ms; +207.977ms] or [-8.043%; +7.799%]

scenario:appsec-appsec-enabled-26

  • unstable execution_time [-243.735ms; +238.709ms] or [-9.550%; +9.354%]

scenario:appsec-appsec-enabled-with-attacks-24

  • unstable execution_time [-154.119ms; +166.663ms] or [-4.993%; +5.399%]

scenario:appsec-appsec-enabled-with-attacks-26

  • unstable execution_time [-203.327ms; +187.557ms] or [-6.995%; +6.452%]

scenario:appsec-control-20

  • unstable execution_time [-127.284ms; +113.582ms] or [-7.686%; +6.858%]

scenario:appsec-control-24

  • unstable execution_time [-96.771ms; +124.380ms] or [-7.835%; +10.070%]

scenario:appsec-control-26

  • unstable execution_time [-122463.140µs; +123296.806µs] or [-9.884%; +9.951%]

scenario:appsec-iast-no-vulnerability-iast-enabled-always-active-20

  • unstable execution_time [-9.204ms; +17.333ms] or [-3.640%; +6.855%]

scenario:appsec-iast-with-vulnerability-iast-enabled-always-active-20

  • unstable execution_time [-27.602ms; +31.020ms] or [-4.930%; +5.540%]

scenario:child_process-file-args-24

  • unstable execution_time [-31.005ms; +41.880ms] or [-6.552%; +8.850%]
  • unstable throughput [-131165.105op/s; +105977.510op/s] or [-5.943%; +4.802%]

scenario:debugger-line-probe-with-snapshot-default-24

  • unstable cpu_user_time [-2036.600ms; +3250.411ms] or [-24.608%; +39.274%]
  • unstable execution_time [-2183.021ms; +3414.135ms] or [-24.267%; +37.952%]
  • unstable instructions [-17.1G instructions; +27.3G instructions] or [-25.278%; +40.365%]
  • unstable max_rss_usage [-8.388MB; +13.258MB] or [-5.347%; +8.451%]
  • unstable throughput [-886.278op/s; +574.034op/s] or [-24.128%; +15.628%]

scenario:debugger-line-probe-with-snapshot-minimal-24

  • unstable cpu_user_time [-1.612s; +5.213s] or [-16.995%; +54.958%]
  • unstable execution_time [-1.689s; +5.340s] or [-16.522%; +52.232%]
  • unstable instructions [-13.5G instructions; +44.0G instructions] or [-17.308%; +56.672%]
  • unstable max_rss_usage [-6.217MB; +21.755MB] or [-3.830%; +13.404%]
  • unstable throughput [-1403.545op/s; +452.625op/s] or [-41.949%; +13.528%]

scenario:debugger-line-probe-with-snapshot-minimal-26

  • unstable cpu_user_time [-2313.616ms; +781.234ms] or [-24.324%; +8.213%]
  • unstable execution_time [-2412.030ms; +829.303ms] or [-23.546%; +8.096%]
  • unstable instructions [-20.5G instructions; +6.7G instructions] or [-25.732%; +8.409%]
  • unstable throughput [-166.576op/s; +459.071op/s] or [-5.129%; +14.135%]

scenario:debugger-line-probe-without-snapshot-24

  • unstable cpu_user_time [-2849.220ms; +3964.133ms] or [-30.115%; +41.900%]
  • unstable execution_time [-2945.866ms; +4085.406ms] or [-28.882%; +40.054%]
  • unstable instructions [-23.7G instructions; +33.8G instructions] or [-30.486%; +43.444%]
  • unstable max_rss_usage [-11.487MB; +15.894MB] or [-7.089%; +9.809%]
  • unstable throughput [-1073.458op/s; +797.937op/s] or [-32.030%; +23.809%]

scenario:debugger-line-probe-without-snapshot-26

  • unstable cpu_user_time [-2677.123ms; +4210.022ms] or [-28.076%; +44.152%]
  • unstable execution_time [-2655.128ms; +4244.766ms] or [-25.889%; +41.389%]
  • unstable instructions [-23.5G instructions; +37.3G instructions] or [-29.501%; +46.874%]
  • unstable max_rss_usage [-7.700MB; +13.331MB] or [-4.829%; +8.361%]
  • unstable throughput [-830.995op/s; +518.787op/s] or [-25.690%; +16.038%]

scenario:dogstatsd-with-tags-20

  • unstable cpu_user_time [-184.650ms; +419.723ms] or [-3.820%; +8.684%]
  • unstable execution_time [-184.325ms; +420.179ms] or [-3.755%; +8.560%]
  • unstable throughput [-146813.082op/s; +64434.924op/s] or [-8.599%; +3.774%]

scenario:plugin-graphql-long-with-depth-on-max-20

  • unstable cpu_user_time [-622.853ms; +592.312ms] or [-5.392%; +5.128%]
  • unstable execution_time [-639.865ms; +603.081ms] or [-5.426%; +5.114%]
  • unstable throughput [-3.517op/s; +3.742op/s] or [-5.153%; +5.482%]

@BridgeAR
BridgeAR marked this pull request as ready for review August 4, 2026 14:11
@BridgeAR
BridgeAR requested review from a team as code owners August 4, 2026 14:11
@BridgeAR
BridgeAR requested review from khanayan123 and wconti27 and removed request for a team August 4, 2026 14:11

@datadog-official datadog-official Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Datadog Autotest: PASS

More details

The iteration-fallback changes preserve behavior across the exercised runtime paths, including absent, empty, malformed, and populated Bedrock, LLMObs, CI manifest, routing, and test-runner inputs. No additional tests recommended: the production-shaped cases were already covered by the changed Bedrock tests or existing neighboring suites, and no surprising input class or regression was found.

Was this helpful? React 👍 or 👎

📊 Validated against 12 scenarios · Open Bits AI session

🤖 Datadog Autotest · Commit 39fce0f · What is Autotest? · @DataDog review to ask questions · Any feedback? Reach out in #autotest

@BridgeAR
BridgeAR merged commit f6912b6 into master Aug 4, 2026
714 of 715 checks passed
@BridgeAR
BridgeAR deleted the BridgeAR/2026-08-04-unicorn-73-iteration-rule branch August 4, 2026 15:28
dd-octo-sts Bot pushed a commit that referenced this pull request Aug 5, 2026
)

Update `eslint-plugin-unicorn` to 73.0.0 and enable `unicorn/iteration-fallback-style` across the repository.

The rule makes iterable fallback contracts explicit. Repository-owned collections are iterated directly, while nullable and third-party values keep guarded iteration.
@dd-octo-sts dd-octo-sts Bot mentioned this pull request Aug 5, 2026
dd-octo-sts Bot pushed a commit that referenced this pull request Aug 5, 2026
)

Update `eslint-plugin-unicorn` to 73.0.0 and enable `unicorn/iteration-fallback-style` across the repository.

The rule makes iterable fallback contracts explicit. Repository-owned collections are iterated directly, while nullable and third-party values keep guarded iteration.
@dd-octo-sts dd-octo-sts Bot mentioned this pull request Aug 5, 2026
juan-fernandez pushed a commit that referenced this pull request Aug 5, 2026
)

Update `eslint-plugin-unicorn` to 73.0.0 and enable `unicorn/iteration-fallback-style` across the repository.

The rule makes iterable fallback contracts explicit. Repository-owned collections are iterated directly, while nullable and third-party values keep guarded iteration.
juan-fernandez pushed a commit that referenced this pull request Aug 5, 2026
)

Update `eslint-plugin-unicorn` to 73.0.0 and enable `unicorn/iteration-fallback-style` across the repository.

The rule makes iterable fallback contracts explicit. Repository-owned collections are iterated directly, while nullable and third-party values keep guarded iteration.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants